package com.liqi.frame.comm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liqi.frame.comm.po.RolePermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 角色与权限的数据访问对象
 * Created by liqi on 2018/1/3.
 * liqiwork@qq.com
 */
public interface RolePermissionDao extends BaseMapper<RolePermission> {

    int insertRoleAndPermissions(List<RolePermission> rolePermrissions);
    int deleteRoleAndPermissionsByIds(@Param("ids") String[] ids);
    int deleteRoleAndPermissionsByRoleId(@Param("roleId") String roleId);
    int deleteRoleAndPermissionsByPermissionId(@Param("permissionId") String permissionId);
    List<RolePermission> getRoleAndPermissionsByRoleId(@Param("roleId") String roleId, @Param("permissionType") String permissionType);
}
